#ifndef __PCF8574_PWM_H
#define __PCF8574_PWM_H

#include "_config_cpu_.h"
#include "_config_cpu_i2c.h"

#if (PCF8574_USE_I2C == 0)
	#include "i2c0.h"
	#define pcf8574_Send  		i2c0_WriteBuffer
	#define pcf8574_Receive  	i2c0_ReadBuffer
#elif (PCF8574_USE_I2C == 1)
	#include "i2c1.h"
	#define pcf8574_Send 		i2c1_WriteBuffer
	#define pcf8574_Receive 	i2c1_ReadBuffer
#elif (PCF8574_USE_I2C == 2)
	#include "i2c2.h"
	#define pcf8574_Send 		i2c2_WriteBuffer
	#define pcf8574_Receive 	i2c2_ReadBuffer
#else
	#error NÃO FOI DEFINIDO QUAL O BARRAMENTO I2C NO _config_cpu_i2c.h
#endif

int pcf8574_Write(u8 addr, u8 value);
int pcf8574_Read(u8 addr, u8* value);

#endif
